import About from "../pages/About"
import Home from "../pages/Home"
import News from "../pages/News"
import Message from "../pages/Message"
import MessageDetail from "../pages/MessageDetail"
import notFound from "../pages/notFound"
const routes = [
  {name:"About",path:"/About",component:About},
  {
    path:"/Home",
    component:Home,
    children:[
      // path:不能以/开头
      {path:"News",component:News},
      {
        path:"Message",
        component:Message,
        children:[
          {
            name:"MessageDetail",
            path:":id",
            component:MessageDetail,
            props:true
          }
        ]
      },
      {path:"",redirect:"News"}
    ]
  },
  {path:"/",redirect:"/About"},
  {path:"*",component:notFound}
]

export default routes
